//
//  LoginManager.h
//  CBT
//
//  Created by Mr.Zhang on 2018/11/28.
//  Copyright © 2018 Mr.Zhang. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef void (^loginManager_result_block)(id data, HttpRequestResult result,NSString *msg);

NS_ASSUME_NONNULL_BEGIN

@interface LoginManager : NSObject


/** 手机号、邮箱登录 */
+(void)phoneaAndEmailLoginWithID:(NSString *)ID isPhone:(BOOL)phone pwd:(NSString *)pwd area:(NSString *)area block:(loginManager_result_block)block;

/**
 手机号、邮箱注册、修改密码

 @param ID 账号
 @param phone 是否手机号
 @param code 验证码
 @param pwd 密码
 @param avatar 推荐人
 @param setPassword 是否忘记密码
 @param block 成功回调
 */
+(void)phoneaAndEmailRegisteredWithID:(NSString *)ID area:(NSString *)area isPhone:(BOOL)phone code:(NSString *)code pwd:(NSString *)pwd avatar:(NSString *)avatar isSetPassword:(BOOL)setPassword block:(loginManager_result_block)block;


/**
 发送手机、邮箱验证码
 
 @param ID ID
 @param phone 是否手机号
 @param type 注册新用户为1，修改密码、找回密码、设置支付密码为2
 @param block 成功回调
 */
+(void)sendPhoneAndEmailCodeWithID:(NSString *)ID area:(NSString *)area isPhone:(BOOL)phone type:(NSString *)type block:(loginManager_result_block)block;

@end

NS_ASSUME_NONNULL_END
